#!/bin/bash

## Gather Options
## --------------------
if [ $# -ne 1 ]; then
	echo "Usage: $0 [fileWithPids]"
	exit -1
fi

mkdir `dirname $1`/killed_processes
ps aux > `dirname $1`/process.list

for i in `cat $1`
do
	ps aux | grep $i > `dirname $1`/killed_processes/$i.ps.info
	kill -9 $i
done
